BLE Module Initialization
This page covers Phase 4 — BLE module preparation and writing. It is called from the OpenLink initialization path and applies to M18, M12, MX, and embedded-tick products that carry a BLE module with unique identity support.
Phase 4 — BLE Module Preparation & Write
4a. Determine module type
- Read the BLE module type. On failure, retry once.
- If still unreadable: for an MX tool/battery that was originally a BLE113, override the type to BLE113; otherwise propagate the error.
- Wrong-kit guard: if the tool record indicates a linked BLE record exists but the connected module reports BLE113, abort with a "wrong service kit installed" error.
- If the module is BLE113 (no unique identity support), stop here — nothing to write.
4b. Capability detection (BGM11S / BGM220 / BGM13S)
- Read the BLE firmware version. If it reports
Unknown, abort. - Determine encryption support:
- BGM220 and BGM13S: always supported.
- BGM11S: supported only if firmware ≥ 5.1.0.0.
4c. Obtain the BLE context (identity to write)
- If the tool record already carries a BLE context, use it — but:
- It must contain a unique MPBID and all four passwords plus a BOD, or abort.
- If encryption is supported but the MLS certs are missing or invalid, unlink the existing BLE record from the tool (cloud) and provision a fresh one (see BLE provisioning).
- Else if a cached provision record exists in the local cache for this tool MPBID, use it.
- Else provision a new BLE record (see BLE provisioning).
4d. Write BLE initialization data
- Establish METCO access on the module: try the default METCO password first. If that fails, try the METCO password from the BLE context. If that also fails, read the module's current MPBID, fetch that MPBID's tool record from the cloud, and try its METCO password. If all fail, abort.
- Write, in order:
- BLE MPBID
- BLE METCO Password
- BLE User Password
- BLE Admin Password
- BLE Service Password
- BLE Born-On-Date
- Set the BLE real-time clock to the current Unix time (seconds).
- Product-specific BLE thresholds (low-pack ADC thresholds, written as 16-bit hex):
- One-inch D-handle impact wrench: ADC1 =
095C, ADC2 =08C6, ADC3 =095C. - Digital torque wrench: ADC1 = ADC2 = ADC3 =
0967.
- One-inch D-handle impact wrench: ADC1 =
- If an ownership claim key is present, write it to the module.
- MLS certificates (only if all four cert artifacts are present):
- Validate each artifact has an even-length hex string; abort if not.
- Erase existing security certificates.
- For each of the following, write a 4-byte size/count to the size segment, then write the cert payload (payload is written in two parts across paired memory segments):
- Public Root Cert
- Public Intermediary Cert
- Public Device Cert
- Private Device Raw Key (size, then the raw key)
4e. BLE provisioning (when a fresh record is needed)
- Manufacturing: provision a new record using the product ID for the module type, requesting certs only if encryption is supported. Product IDs by module:
- BGM11S →
0x00A1 - BGM220 →
0x014F - BGM13S →
0x0192
- BGM11S →
- Cloud: link the new BLE record to the tool (tool MPBID + module MPBID).
- If linking fails because the tool MPBID is "not found": import the tool record (MPBID, all four passwords, BOD), then retry the link with exponential backoff — up to 5 attempts, waiting 1s, 2s, 4s, 8s, 16s before successive attempts. If all fail, abort with the last error.
- Any other link error is propagated immediately.
- Cache the provisioned BLE record (keyed by tool MPBID) in the local cache for reuse.